package baseFx.common;

public class Var<T> {
    private T var;

    public Var(T init) {
        var = init;
    }

    public Var() {

    }

    public void set(T value) {
        this.var = value;
    }

    public T get() {
        return get(null);
    }

    public T get(T def) {
        return var != null ? var : def;
    }

    public boolean isNull() {
        return var == null;
    }
}
